import { connect } from 'react-redux'
import Counter from '../components/Counter'
import { increase, reduce } from '../actions'

const mapStateToProps = (state) => {
    console.log(state)
    return {
        count: state.count
    }
}

const mapDispatchToProps = (dispatch) => {
    return {
        increaseClick: () => {
            dispatch(increase)
        },
        reduceClick: () => {
            dispatch(reduce)
        }
    }
}

const AddCount = connect(
    mapStateToProps,
    mapDispatchToProps
)(Counter)

export default AddCount